home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Mania 5
/
MacMania 5.toast
/
/
Internet software
/
NewsWatcher
/
NW Source
/
Source
/
open.c
< prev
next >
Wrap
Text File
|
1997-01-09
|
1KB
|
43 lines
/*----------------------------------------------------------------------------
open.c
This module handles the "Open" command.
Copyright © 1994-1997, Northwestern University.
----------------------------------------------------------------------------*/
#include "glob.h"
#include "open.h"
#include "sfutil.h"
#include "newsrc.h"
#include "message.h"
#include "fileutil.h"
/*----------------------------------------------------------------------------
DoOpen
Handle the "Open" command.
Exit: function result = error code.
----------------------------------------------------------------------------*/
OSErr DoOpen (void)
{
StandardFileReply reply;
WindowPtr wind;
MyStandardGetFile(nil, kNumOpenTypeList, kOpenTypeList, &reply,
gPrefs.savedUGLDefaultFolder ? gPrefs.savedUGLDefaultFolderAlias : nil);
if (!reply.sfGood) {
return userCanceledErr;
} else if (reply.sfType == kSavedUserGroupListFileType) {
return OpenUserGroupListFile(&reply.sfFile);
} else {
return OpenMessageFile(&reply.sfFile, &wind);
}
}